package com.example.demo.controller;

import com.example.demo.mapper.AddressMapper;
import com.example.demo.mapper.ProviderMapper;
import com.example.demo.model.Address;
import com.example.demo.model.Provider;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: fzykd
 * Date: 2023-03-07
 * Time: 11:10
 */

@RestController
public class AddressController {

    @Autowired
    private AddressMapper addressMapper;

    @Autowired
    private ProviderMapper providerMapper;

    @RequestMapping("/select")
    public List<Address> selectAll(){
        return addressMapper.selectAll();
    }


    @RequestMapping("selectPro")
    public List<Provider> selectPro(){
        return providerMapper.selectAll();
    }
}
